module Pan
  
  class Callbacks
    def initialize
      @callbacks = {}
    end
    
    def register(item, key=nil)
      key = sprintf("%04X", @callbacks.size) if not key
      @callbacks[key] = item 
      key
    end
    
    def find(key)
      @callbacks[key]
    end
    
  end
  
end
